<?php 
$this->pageTitle = 'Sitemap'; 
?> 

<div class="clr"></div>
<div class="content-homenpage">
	<div id="left-column">
		<?php echo $this->element('left_column')?>		
	</div>
	
	<div class="right-store-column" style="padding: 0px;">
		<div class="subpage-content">
			<h1> 
			    Sitemap 
			</h1> 
			
			<table cellpadding="0" cellspacing="0"> 
			<?php 
			if( isset($dynamics) && !empty($dynamics) ): 
			    foreach ($dynamics as $dynamic): ?> 
			    <tr> 
			        <th> 
			        <?php echo $html->link( 
			                               $dynamic['options']['controllertitle'], 
			                               array( 	  'plugin' => $dynamic['options']['url']['plugin'],
			                                          'controller' => $dynamic['options']['url']['controller'],  
			                                          'action' => $dynamic['options']['url']['index'] 
			                                          )); ?> 
			        </th> 
			    </tr> 
			    <?php foreach ($dynamic['data'] as $section):?> 
			    <tr> 
			        <td> 
			        > <?php echo $html->link( 
			                              $section[$dynamic['model']][$dynamic['options']['fields']['title']], 
			                               array( 
			                               			  'plugin' => $dynamic['options']['url']['plugin'],
			                                          'controller' => $dynamic['options']['url']['controller'],  
			                                          'action' => $dynamic['options']['url']['action'],  
			                                          $section[$dynamic['model']][$dynamic['options']['fields']['id']] 
			                                          ) ); ?> 
			        </td> 
			    </tr> 
			    <?php endforeach;?> 
			    <tr> 
			        <td class="clear">&nbsp;</td> 
			    </tr> 
			<?php 
			    endforeach; 
			endif; 
			
			if(isset($statics) && !empty($statics) ):?> 
			    <tr> 
			        <td class="title"> 
			            Misc 
			        </td> 
			    </tr> 
			    <?php foreach ($statics as $static): ?> 
			    <tr> 
			        <td> 
			        <?php echo $html->link( 
			                               $static['title'], 
			                               $static['url']); ?> 
			        </td> 
			    </tr> 
			    <?php endforeach;?> 
			    <tr> 
			        <td class="clear">&nbsp;</td> 
			    </tr> 
			<?php endif; ?>    
			</table>
	</div>
</div>

<?php if($session->check('Auth.User.id')){?>
<?php echo $this->element('toolbar_actions_main',array('plugin'=>'store','toolbar'=>'product'))?>
<?php }?>